#include<bits/stdc++.h>
#define int long long
#define endl '\n'
#define debug(x) cerr<<#x<<':'<<x<<endl
#define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
using namespace std;
const int N=1e5+5,mod=1e9+7;
int f[N];
int x,y;
signed main(){
    freopen("op.in","r",stdin);
    freopen("op.out","w",stdout);
    cin>>x>>y;
    f[x]=1;
    for(int i=x+1;i<=y;i++){
        (f[i]+=f[i-1])%=mod;
        if(i%2==0) (f[i]+=f[i/2])%=mod;
    }
    cout<<f[y];
    return 0;
}
/*
1 2
2 4
3 10
4 36
5 202
6 1828
*/